package com.inctech.clz2.test1;

interface PayStyle{
	double pay1(double price);
	double pay2(double price);
	double pay3(double price);
}

public class FourthQuestion implements PayStyle{

	@Override
	public double pay1(double price) {
		return price*0.7;
	}

	@Override
	public double pay2(double price) {
		if(price < 100){
			return pay1(price);
		}else{
			return (price * 0.7) - 10;
		}
		
	}

	@Override
	public double pay3(double price) {
		if(price < 100){
			return pay1(price);
		}else if(price < 1000){
			return pay2(price);
		}else{
			return (price - 100) * 0.8;
		}
	}
	
	
}
